//
//  HKFastButton.m
//  BaiSiBuDeJie
//
//  Created by 胡锦涛 on 2018/12/2.
//  Copyright © 2018 胡锦涛. All rights reserved.
//

#import "HKFastButton.h"

@implementation HKFastButton
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    // 1. 设置图片位置
    self.imageView.y = 0;
    self.imageView.centerX = self.width * 0.5;
    
    // 2. 设置标题位置
    self.titleLabel.y = self.height - self.titleLabel.height;
    
    // 计算文字宽度 , 设置label的宽度
    [self.titleLabel sizeToFit];
    
    self.titleLabel.centerX = self.width * 0.5;
    
}
@end
